<script>
	export default {
		onLaunch: function() {
			uni.connectSocket({url:'ws://192.168.1.100:8081'})
			uni.onSocketOpen(()=>{
				console.log("websocket连接已打开");
			})
			uni.onSocketMessage((msg)=>{
				console.log(msg);
				
			})
		},
		onShow: function() {
			
		},
		onHide: function() {
			
		}
	}
</script>

<style lang="scss">
	@import 'uview-plus/index.scss';
	/*每个页面公共css */
	page{
		width: 100%;
		height: 100%;
		padding-top: 3%;
		box-sizing: border-box;
		background-image: url('static/bg.png');
		background-repeat: no-repeat;
		background-size: 100% 100%;
	}
</style>
